package com.zb.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author WEN
 * @Date 2024/3/3 0003
 **/
@Data
@ApiModel("后台系统字段导出对象")
public class OrderSysFieldExportDto {
    @ApiModelProperty(value = "系统字段导出ID，新增不必传，修改必传")
    private Long id;

    @NotBlank(message = "字段名称")
    @Length(min = 2, max = 20, message = "字段名称长度限制20个字符，至少输入2个字符")
    @ApiModelProperty(value = "字段名称", required = true)
    private String name;

    @NotBlank(message = "字段代码")
    @Length(min = 2, max = 60, message = "字段代码长度限制60个字符，至少输入2个字符")
    @ApiModelProperty(value = "字段代码", required = true)
    private String code;

    @NotNull(message = "排序值不能为空")
    @ApiModelProperty(value = "排序，值越小越靠前", example = "0")
    private Integer sort;

    @NotNull(message = "字段状态不能为空")
    @ApiModelProperty(value = "字段状态：false-启用，true-禁用", required = true, example = "false")
    private Boolean status;
}
